package com.teemo.dp.prototype.demo2;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Teemo
 */
public class Demo {
    public static void main(String[] args) throws CloneNotSupportedException {
        Resume resume = new Resume();
        resume.setName("张三");
        resume.setSex("男");
        resume.setAge(18);
        List<String> skills = new ArrayList<>();
        skills.add("java");
        skills.add("c++");
        skills.add("python");

        resume.setSkills(skills);
        ExtInfo extInfo = new ExtInfo();
        extInfo.setSlogan1("123");
        extInfo.setSlogan2("123");
        extInfo.setSlogan3("123");
        resume.setExtInfo(extInfo);
//        ……
        Resume resume1 = resume.clone();
        resume1.setName("李四");
        resume1.getExtInfo().setSlogan1("teemo");
        resume1.getSkills().add("php");
        System.out.println(resume);
        System.out.println(resume1);

    }
}
